
S = cell(4, 1);

S{1, 1} = { "gsl_ext_mnewton", ...
            "gsl_steepest_descent", ...
            "gsl_ext_conjgrad_pr_mt", ...
            "gsl_ext_bfgs_f", ...
            "gsl_ext_lrwwsimplex" };

S{2, 1} = { "gsl_ext_mnewton", ...
            "gsl_ext_bfgs_mt", ...
            "gsl_ext_bfgs_f", ...
            "gsl_vector_bfgs2", ...
            "gsl_vector_bfgs" };

S{3, 1} = { "gsl_ext_conjgrad_fr_mt", ...
            "gsl_ext_conjgrad_pr_mt", ...
            "gsl_conjugate_pr", ...
            "gsl_conjugate_fr" };

S{4, 1} = { "gsl_ext_lrwwsimplex", ...
            "gsl_nmsimplex" };

P = GSLpp_testfunctions;

COLORS  = { "r", "g", "b", "c", "m" };
MARKERS = { "^", "*", "x", "o", "+" };

for sgi = 1:length(S)
  [ R, tau, rho ] = GSLpp_performance_profile(S{sgi}, P);
  figure;
  hold on;
  for si = 1:length(S{sgi})
    plot(tau, rho(:, si), [ COLORS{si}, "-", MARKERS{si} ], "linewidth", 5, "markersize", 10);
  endfor
  hold off;
  
  L = cell(length(S{sgi}), 1);
  for j = 1:length(S{sgi})
    L{j} = GSLpp_title(S{sgi}{j});
  endfor
  legend(L, "location", "southeast");
  legend("boxon");
  
  print([ "perfprofs_", num2str(sgi), ".ps" ], "-landscape", "-solid", "-FArial:23");
  close;
endfor
